package com.codemeta.bokit.douyin.core.props;

import java.util.Collections;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

/**
 * 抖音配置文件对象
 *
 * @author hice
 */
@Data
@Validated
@ConfigurationProperties(prefix = "bokit.douyin")
public class DouyinProps {

    /**
     * 网关地址
     */
    private String host = "https://open.douyin.com";
    /**
     * 客户端key
     */
    @NotBlank(message = "抖音开放平台应用key不可为空")
    private String clientKey;
    /**
     * 客户端秘钥
     */
    @NotBlank(message = "抖音开放平台应用secret不可为空")
    private String clientSecret;
    /**
     * 回调地址
     */
    @NotBlank(message = "抖音开放平台应用授权回调地址不可为空")
    private String redirectUri;
    /**
     * 需要授权的作用域
     */
    @NotEmpty(message = "授权作用域不可为空")
    private List<String> scopes = Collections.emptyList();

}